package uk.org.kano.wifilogin.loginmethods;

import java.util.Hashtable;
import javax.security.auth.callback.CallbackHandler;

public interface WifiAuthenticationScheme {

	/**
	 * Get the publicly identifiable name for this scheme.
	 * 
	 * @return The publicly viewable name
	 */
	public int getName();

	/**
	 * Get a details description of the scheme's functionality.
	 * 
	 * @return A longer description of the publicly viewable name
	 */
	public int getDescription();

	/**
	 * Initialise the authentication scheme
	 * 
	 * @param callbackhandler
	 *            The CallbackHandler instance to query parameters from.
	 * @return true if initialised successfully, false otherwise.
	 */
	public boolean initialize(CallbackHandler callbackhandler,
			Hashtable<String, String> properties);

	/**
	 * Perform a login.
	 * 
	 * @return true if the login is successful, false otherwise
	 */
	public boolean login();

	/**
	 * Perform a logout.
	 * 
	 * @return true if the logout was successful, false otherwise
	 */
	public boolean logout();
}
